import jakarta.servlet.annotation.WebInitParam;
import java.io.*;
import java.util.Enumeration;

import jakarta.servlet.*;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.*;

@WebServlet(name="TestServlet04",urlPatterns = "/TestServlet04")
public class TestServlet04 extends HttpServlet{
    protected void doGet(HttpServletRequest request,
                         HttpServletResponse response)throws ServletException,IOException{
        response.setContentType("text/html;charset=utf-8");
        PrintWriter out=response.getWriter();
        ServletContext context=this.getServletContext();
        Enumeration<String> paramNames=context.getInitParameterNames();
        out.println("all the paramName and paramValue are following");
        while (paramNames.hasMoreElements()){
            String name =paramNames.nextElement();
            String value=context.getInitParameter(name);
            out.println(name+":"+value);
            out.println("<br />");
        }
    }
}
